package com.es.designmode.strategy;

/**
 * @author Will
 */
public class ContextFactory {

    Strategy strategy = null;

    public ContextFactory(char type) {

        switch (type) {
            case 'a':
                strategy = new ConcreteStrategyA();
                break;
            case 'b':
                strategy = new ConcreteStrategyB();
                break;
            default:
                break;
        }
    }

    public void Algorithm() {
        strategy.AlgorithmInterface();
    }

}
